<!--
  Generated template for the MyproductPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar color="primary">
    <ion-title>我的商品</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
    <div class="empty" *ngIf="myproduct == null || myproduct.length == 0">
        无商品发布！
      </div>
    <ion-row *ngFor="let  prod of myproduct">
        <ion-col col-10>
          <ion-checkbox [(ngModel)]="prod.checked"></ion-checkbox>
        </ion-col>
        <ion-col col-90 (click)="productdetail(prod.product_id)">
          {{prod.title}}
          <span style="color:green" *ngIf="prod.status == '1'" >(上架状态)</span>
          <span style="color:red" *ngIf="prod.status == '2'">(下架状态)</span>
          <span style="color:yellow" *ngIf="prod.status == '3'">(已售出)</span>
          <hr>
        </ion-col>
      </ion-row>
</ion-content>
<ion-footer>
  <ion-grid>
    <ion-row>
        <ion-col col-50 (click)="sxjPro('1')" >
            <button ion-button small icon-only outline color="primary">
              <div style="padding-left: 10px;padding-right: 10px;">上架商品</div>
            </button>
          </ion-col>
          <ion-col col-50 (click)="sxjPro('2')" >
            <button ion-button small icon-only outline color="danger">
              <div style="padding-left: 10px;padding-right: 10px;">下架商品</div>
            </button>
          </ion-col>
    </ion-row>
  </ion-grid>
</ion-footer>
